<div class="banner" style="background:url('<%= banner_for(@banner) %>') no-repeat center center">
  <div class="content">
    <h2>News</h2>
    <h1>新/闻/资/讯</h1>
  </div>
</div>
<div id="main">
  <div class="comm-box">

    <%= breadcrumb('posts')%>
    <div class="article-list">
      <ul>
        <% @posts.each do |post| %>
          <li>
            <%= link_to image_tag(post.front_img), post, class: "cover"%>
            <div class="detail">
              <h1><%= link_to "#{format_datetime(post.created_at, '%Y/%m/%d')} #{post.title}", post %></h1>
              <p>
                <%= raw post.content.truncate(100) %>
              </p>
            </div>
            <%= link_to '', post, class: 'more' %>
          </li>
        <% end %>
      </ul>
    </div>
    <%= will_paginate @posts, first_label: '首页', previous_label: '上一页', next_label: '下一页', last_label: '末页' %>
  </div>
  <%= render 'sidebar'%>
  <div class="c"></div>
</div>
